 var at = Ze(Qe.exports)
      , ut = function() {
        function e(t) {
            var n, o, u = this;
            a(this, e),
            c(this, "whitelist", []),
            c(this, "blacklist", []),
            c(this, "handler", (function() {
                return Promise.resolve("Please set a handler for middleware")
            }
            )),
            "function" == typeof t ? n = t : (this.whitelist = (null == t ? void 0 : t.whitelist) || [],
            this.blacklist = (null == t ? void 0 : t.blacklist) || [],
            n = null == t ? void 0 : t.handler,
            null != t && t.payload && (o = t.payload)),
            this.handler = function() {
                var t = i(r().mark((function t(i, a, s) {
                    var c;
                    return r().wrap((function(t) {
                        for (; ; )
                            switch (t.prev = t.next) {
                            case 0:
                                if (!0 === (null == s ? void 0 : s.disabled)) {
                                    t.next = 16;
                                    break
                                }
                                if (c = i.config.url,
                                !u.whitelist.length) {
                                    t.next = 9;
                                    break
                                }
                                if (u.match(c, u.whitelist)) {
                                    t.next = 7;
                                    break
                                }
                                return t.next = 6,
                                a();
                            case 6:
                            case 13:
                            case 18:
                            case 21:
                                return t.abrupt("return", t.sent);
                            case 7:
                                t.next = 14;
                                break;
                            case 9:
                                if (!u.blacklist.length) {
                                    t.next = 14;
                                    break
                                }
                                if (!u.match(c, u.blacklist)) {
                                    t.next = 14;
                                    break
                                }
                                return t.next = 13,
                                a();
                            case 14:
                                t.next = 19;
                                break;
                            case 16:
                                return t.next = 18,
                                a();
                            case 19:
                                return t.next = 21,
                                (n || u.handler).bind(u)(i, a, e.mergeConfig(s, o));
                            case 22:
                            case "end":
                                return t.stop()
                            }
                    }
                    ), t)
                }
                )));
                return function(e, r, n) {
                    return t.apply(this, arguments)
                }
            }()
        }
        return s(e, [{
            key: "match",
            value: function(e, t) {
                for (var r = !1, n = 0; n < t.length; n++)
                    if (e.indexOf(t[n]) > -1) {
                        r = !0;
                        break
                    }
                return r
            }
        }]),
        e
    }();
    c(ut, "handler", void 0),
    c(ut, "mergeConfig", (function(e, r) {
        return t(t({}, e || {}), {}, {
            payload: t(t({}, (null == e ? void 0 : e.payload) || {}), r || {})
        })
    }
    ));
    var st = function(e) {
        for (var t = "", r = 0; r < e.length; r++)
            t += String.fromCharCode(e.charCodeAt(r) - 1);
        return t
    }
      , ct = "wbi_img_urls";
    function lt(e) {
        var t, r, n = function(e) {
            var t;
            if (e.useAssignKey)
                return {
                    imgKey: e.wbiImgKey,
                    subKey: e.wbiSubKey
                };
            var r = (null === (t = function(e) {
                try {
                    return localStorage.getItem(e)
                } catch (e) {
                    return null
                }
            }(ct)) || void 0 === t ? void 0 : t.split("-")) || []
              , n = r[0]
              , o = r[1]
              , i = n ? ft(n) : e.wbiImgKey
              , a = o ? ft(o) : e.wbiSubKey;
            return {
                imgKey: i,
                subKey: a
            }
        }(arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
            wbiImgKey: "",
            wbiSubKey: ""
        }), o = n.imgKey, i = n.subKey;
        if (o && i) {
            for (var a = (t = o + i,
            r = [],
            [46, 47, 18, 2, 53, 8, 23, 32, 15, 50, 10, 31, 58, 3, 45, 35, 27, 43, 5, 49, 33, 9, 42, 19, 29, 28, 14, 39, 12, 38, 41, 13, 37, 48, 7, 16, 24, 55, 40, 61, 26, 17, 0, 1, 60, 51, 30, 4, 22, 25, 54, 21, 56, 59, 6, 63, 57, 62, 11, 36, 20, 34, 44, 52].forEach((function(e) {
                t.charAt(e) && r.push(t.charAt(e))
            }
            )),
            r.join("").slice(0, 32)), u = Math.round(Date.now() / 1e3), s = Object.assign({}, e, {
                wts: u
            }), c = Object.keys(s).sort(), l = [], f = /[!'()*]/g, d = 0; d < c.length; d++) {
                var p = c[d]
                  , h = s[p];
                h && "string" == typeof h && (h = h.replace(f, "")),
                null != h && l.push("".concat(encodeURIComponent(p), "=").concat(encodeURIComponent(h)))
            }
            var v = l.join("&");
            return {
                w_rid: at(v + a),
                wts: u.toString()
            }
        }